package com.itany.corejava.day07;

import com.itany.corejava.day06.Person;

public class Test1 {

    public final int i;

    public static int count;

    public String name;


    public Test1() {
        i=1;
        count++;
    }



    public static void main(String[] args) {


        Test1 t=new Test1();
        System.out.println(t.i);
        // t.i=3;


        final int i;
        i=5;
        // i=7;

        final Person p=new Person("abc",true);

        System.out.println(p.getName());

        p.setName("aaa");

        System.out.println(p.getName());

        // p=new Person(false);

        Test1 t2=new Test1();
        t2.name="aaa";

        Test1 t3=new Test1();
        t3.name="bbb";

        System.out.println(t2.name);
        System.out.println(t3.name);

        // System.out.println(t2.count);
        // System.out.println(t3.count);
        System.out.println(Test1.count);


        Complex c1=new Complex(3,5);
        Complex c2=new Complex(6,2);

        System.out.println("c1 = " + c1);
        System.out.println("c2 = " + c2);

        System.out.println("c1.add(c2) = " + c1.add(c2));
        System.out.println("Complex.add(c1,c2) = " + Complex.add(c1,c2));

        System.out.println("c1 = " + c1);
        System.out.println("c2 = " + c2);




    }
}
